Lost canvas reference

Hi,

I have problems with a lost canvas reference. In a DXL-layout I use the

getCanvas()

function to get the canvas DBE, to be able to set background color etc. The problems seem to occur when the

text(Column c, Object o)

is used.

getCanvas

returns null after a call to the text function and messes up the DXL-layout.

I have implemented a compare baseline function which replaces the current columns in a view with the difference (red/bluelining). In the replaced main column the

getCanvas()

is used to make it look like the original, see below. When I try to export this to Word (using the built-in function) the export crashes due to error in DXL.

Has anybody have the same or similar problems? Or do you have a solution/workaround?

/Anders

Code snippet from DXL-layout:
funcGetDiff gets the difference between object o and obj for the supplied attribute.
 

sDisp = funcGetDiff(o, obj, "Object Heading")
iLevel = level(obj)
if ( iLevel > 9 )
{
   iLevel = 9
}
font(getCanvas, iLevel, HeadingsFont)
if ( !null(plainText(sDisp)) )
{
   displayRichWithColor(number(obj) " " sDisp)
}
 
sDisp = funcGetDiff(o, obj, "Object Text")
font(getCanvas, iLevel, TextFont)
displayRichWithColor(sDisp)

a_vestlin - Fri Dec 12 05:10:13 EST 2008

Re: Lost canvas reference
dpechacek - Fri Dec 12 08:59:37 EST 2008

It seems that calling the text function deletes the virtual canvas in a layout column. Or something like that. I would raise this as a support issue.

Only solution I can see for now would be to not use the canvas.

AAI Services, Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com

Re: Lost canvas reference
SystemAdmin - Mon Mar 16 15:58:33 EDT 2009

Were you ever to get a workaround to your situation Anders? I've run across the same problem trying to export to Word.

This SmartDXL script will only export if the font calls are commented out.

Link: http://www.smartdxl.com/layout.html

Re: Lost canvas reference
a_vestlin - Tue Mar 17 02:31:09 EDT 2009

SystemAdmin - Mon Mar 16 15:58:33 EDT 2009
Were you ever to get a workaround to your situation Anders? I've run across the same problem trying to export to Word.

This SmartDXL script will only export if the font calls are commented out.

Link: http://www.smartdxl.com/layout.html

No, I also had to comment out all lines of code involving use of the canvas. But I found out that the built-in print function prints as expected (wanted). I guess it never uses the text(Column c, Object o) function.

/Anders

Re: Lost canvas reference
SystemAdmin - Tue Mar 17 06:19:44 EDT 2009

SystemAdmin - Mon Mar 16 15:58:33 EDT 2009
Were you ever to get a workaround to your situation Anders? I've run across the same problem trying to export to Word.

This SmartDXL script will only export if the font calls are commented out.

Link: http://www.smartdxl.com/layout.html

The Word export uses the "text" function to check for non-empty columns, so the problem with this export might be the same as David described earlier in this thread.

But note that you can get a working export from this kind of view if you use the Rich Text Format export to RTF file instead of the Word export.

Re: Lost canvas reference
SystemAdmin - Tue Mar 17 09:25:59 EDT 2009

SystemAdmin - Tue Mar 17 06:19:44 EDT 2009
The Word export uses the "text" function to check for non-empty columns, so the problem with this export might be the same as David described earlier in this thread.

But note that you can get a working export from this kind of view if you use the Rich Text Format export to RTF file instead of the Word export.

Please disregard the RTF export comment - it does not work.